<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Message extends Model
{
    protected $table = 'messages';

    //指定主键
    protected $primaryKey = 'id';

    //指定允许批量赋值的字段
    protected $fillable = [
        'message_field_1',
        'message_field_2',
        'message_field_3',
        'message_field_4',
        'message_field_5',
        'message_field_6',
        'message_field_7',
        'message_field_8',
        'message_field_9',
        'message_field_10',
        'message_field_11',
        'message_field_12',
        'message_field_13',
        'message_field_14',
        'message_field_15',
        'message_field_16',
        'message_field_17',
        'message_field_18',
        'message_field_19',
        'message_field_20',
        'info',
        'ip',
        'status',
    ];

    //指定不允许批量赋值的字段
    protected $guarded = [];

    //自动维护时间戳
    public $timestamps = true;

    //定制时间戳格式
//    protected $dateFormat = 'U';
}
